<#assign menu="order">
<#assign submenu="check_order">
<#include "../../manage/head.ftl">
<style type="text/css">

</style>
<section id="main-content">
    <section class="wrapper">
        <!-- page start-->
        <form id="update_order_form" class="form-horizontal" action="${BASE_PATH}/manage/order/check.json"
              autocomplete="off" method="post"
              enctype="multipart/form-data">
            <fieldset>
                <div class="row">
                    <input type="hidden" name="id" value="${order.id}">

                    <div class="col-lg-12">
                        <section class="panel">
                            <header class="panel-heading">
                                订单审核
                            </header>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="col-sm-2 col-sm-2 control-label">订单号</label>

                                    <div class="col-sm-10">
                                        <input type="text" style="font-size:15px;width: 300px;" class="form-control"
                                           name="orderId"
                                               placeholder="订单号" value="${order.orderId}">
                                        </input>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 col-sm-2 control-label">商品名</label>

                                    <div class="col-sm-10">
                                        <input type="text" style="font-size:15px;width: 300px;" class="form-control"
                                               name="name"
                                               placeholder="商品名"  value="${order.name}">
                                        </input>
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="col-sm-2 col-sm-2 control-label">用户id</label>

                                    <div class="col-sm-10">
                                        <input type="text" style="font-size:15px;width: 300px;" class="form-control"
                                               name="appUserId"
                                               placeholder="用户id"  value="${order.appUserId}">
                                        </input>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 col-sm-2 control-label">尺寸</label>

                                    <div class="col-sm-10">
                                        <input type="text" style="font-size:15px;width: 300px;" class="form-control"
                                               name="goodsSize"
                                               placeholder="尺寸"  value="${order.goodsSize}">
                                        </input>
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="col-sm-2 col-sm-2 control-label">单价</label>

                                    <div class="col-sm-10">
                                        <input type="text" style="font-size:15px;width: 300px;" class="form-control"
                                               name="goodsPrice"
                                               placeholder="单价"  value="${order.goodsPrice}">
                                        </input>
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="col-sm-2 col-sm-2 control-label">数量</label>

                                    <div class="col-sm-10">
                                        <input type="text" style="font-size:15px;width: 300px;" class="form-control"
                                                   name="goodsCount"
                                               placeholder="数量"  value="${order.goodsCount}">
                                        </input>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 col-sm-2 control-label">其他需求</label>

                                    <div class="col-sm-10">
                                        <input type="text" style="font-size:15px;width: 300px;" class="form-control"
                                               name="otherReq"
                                               placeholder="其他需求"  value="${order.otherReq}">
                                        </input>
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="col-sm-2 col-sm-2 control-label">配送方式</label>

                                    <div class="col-sm-10">
                                        <input type="text" style="font-size:15px;width: 300px;" class="form-control"
                                               name="payType"
                                               placeholder="配送方式"  value="${order.payType}">
                                        </input>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 col-sm-2 control-label">配送费</label>

                                    <div class="col-sm-10">
                                        <input type="text" style="font-size:15px;width: 300px;" class="form-control"
                                               name="shippingPrice"
                                               placeholder="配送费"  value="${order.shippingPrice}">
                                        </input>
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="col-sm-2 col-sm-2 control-label">配送方式</label>

                                    <div class="col-sm-10">
                                        <input type="text" style="font-size:15px;width: 300px;" class="form-control"
                                               name="shippingType"
                                               placeholder="支付方式"  value="${order.shippingType}">
                                        </input>
                                    </div>
                                </div>




                                <div class="form-group">
                                    <div class="col-lg-offset-2 col-lg-10">
                                        <button class="btn btn-shadow btn-primary" type="submit">审核</button>
                                    </div>
                                </div>
                            </div>

                        </section>

                    </div>
                </div>
            </fieldset>
        </form>
        <!-- page end-->
    </section>
</section>


<#include "../../manage/foot.ftl">

<script type="text/javascript">

    $(function () {
        $('#update_order_form').ajaxForm({
            dataType: 'json',
            success: function (data) {
                if (data.result) {
                    bootbox.alert("保存成功，将刷新页面", function () {
                        window.location.reload();
                    });
                } else {
                    showErrors($('#update_order_form'), data.errors);
                }
            }
        });

    });

</script>

